package test;

import expression.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author Chris Meyers
 */
public class ChrisMeyersPETest {
    
    @Before
    public void setUp() {
    }

    @Test
    public void testOne() {
        int answer1 = PostfixEvaluator.eval("2  3  2 ^ + 7 -");
        assertEquals(answer1, 4);
        
        int answer2 = PostfixEvaluator.eval("12 5 3 - 2 ^ +");
        assertEquals(answer2, 16);
        
        int answer3 = PostfixEvaluator.eval("7 5 2 ^ - 4 -");
        assertEquals(answer3, -22);
        
        int answer4 = PostfixEvaluator.eval("43 3 ^ 5 2 ^ 4 * - 2 -");
        assertEquals(answer4, 79405);
        
        int answer5 = PostfixEvaluator.eval("2 4 3 - + 8 8 * +");
        assertEquals(answer5, 67);
    }
}
